<?php 
	//check user has login or not
	if($this->session->userdata('name')){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<title>Welcome Admin Villa Samnang</title>

<link href="<?php echo base_url()?>application/views/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/jquery.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/spinner/ui.spinner.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/spinner/jquery.mousewheel.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/jquery-ui.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/charts/excanvas.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/charts/jquery.sparkline.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/uniform.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.cleditor.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.validationEngine.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/autogrowtextarea.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.dualListBox.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/jquery.inputlimiter.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/forms/chosen.jquery.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/wizard/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/wizard/jquery.validate.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/wizard/jquery.form.wizard.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/uploader/plupload.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/uploader/plupload.html5.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/uploader/plupload.html4.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/uploader/jquery.plupload.queue.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/tables/datatable.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/tables/tablesort.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/tables/resizable.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.tipsy.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.collapsible.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.progress.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.colorpicker.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.jgrowl.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.breadcrumbs.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/ui/jquery.sourcerer.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/calendar.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>application/views/js/plugins/elfinder.min.js"></script>

<script type="text/javascript" src="<?php echo base_url()?>application/views/js/custom.js"></script>

</head>

<body>

<!-- Left side content -->
<div id="leftSide">
    <div class="logo"><a href="<?php echo site_url()?>"><img src="<?php echo base_url()?>application/views/images/logo.png" width="136px" alt=""   /></a></div>
    
    <div class="sidebarSep mt0"></div>
    
    <!-- Menu -->
	<?php
       $router 		= & load_class('Router', 'core');
       $controller_name= $router->fetch_class();
    ?>
    
    <!-- Left navigation -->
    <ul id="menu" class="nav">
        <li class="dash"><a href="<?php echo site_url()?>" title="Dashboard" <?php echo ($controller_name == 'c_main')?'class="active"':''?>><span>Dashboard</span></a></li>
        <li class="dayCalendar"><a href="<?php echo site_url()?>/c_slide" title="Slide" <?php echo ($controller_name == 'c_slide')?'class="active"':''?>><span>Slide</span></a></li>
        <li class="filmStrip2"><a href="<?php echo site_url()?>/c_category" title="Category" <?php echo ($controller_name == 'c_category')?'class="active"':''?>><span>Category</span></a></li>        
        <li class="filmStrip2"><a href="<?php echo site_url()?>/c_product" title="Product" <?php echo ($controller_name == 'c_product')?'class="active"':''?>><span>Product</span></a></li>
        <li class="filmStrip2"><a href="<?php echo site_url()?>/c_setting" title="Product" <?php echo ($controller_name == 'c_setting')?'class="active"':''?>><span>Setting</span></a></li>                
    </ul>
</div>

<!-- Right side -->
<div id="rightSide">

    <!-- Top fixed navigation -->
    <div class="topNav">
        <div class="wrapper">
            <div class="welcome"><a href="#" title=""><img src="<?php echo base_url()?>application/views/images/userPic.png" alt="" /></a><span><?php echo $this->session->userdata('name')?></span></div>
            <div class="userNav">
                <ul>                    
                    <li><a href="<?php echo site_url()?>/c_login/logout" title=""><img src="<?php echo base_url()?>application/views/images/icons/topnav/logout.png" alt="" /><span>Logout</span></a></li>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    
    <!-- Responsive header -->
    <div class="resp">
        <div class="respHead">
            <a href="<?php echo site_url()?>" title=""><img src="<?php echo base_url()?>application/views/images/loginLogo.png" alt="" /></a>
        </div>
        
        <div class="cLine"></div>
        <div class="smalldd">
            <span class="goTo"><img src="<?php echo base_url()?>application/views/images/icons/light/home.png" alt="" />Dashboard</span>
            <ul class="smallDropdown">
                <li class="dash"><a href="<?php echo site_url()?>" title="Dashboard" <?php echo ($controller_name == 'c_main')?'class="active"':''?>><span>Dashboard</span></a></li>
        		<li class="dayCalendar"><a href="<?php echo site_url()?>/c_slide" title="Promotion" <?php echo ($controller_name == 'c_slide')?'class="active"':''?>><span>Slide</span></a></li>
       			<li class="filmStrip2"><a href="<?php echo site_url()?>/c_category" title="Crew & Strenght" <?php echo ($controller_name == 'c_category')?'class="active"':''?>><span>Category</span></a></li>
                <li class="filmStrip2"><a href="<?php echo site_url()?>/c_product" title="Product" <?php echo ($controller_name == 'c_product')?'class="active"':''?>><span>Product</span></a></li>
        		<li class="filmStrip2"><a href="<?php echo site_url()?>/c_setting" title="Product" <?php echo ($controller_name == 'c_setting')?'class="active"':''?>><span>Setting</span></a></li>  
            </ul>
        </div>
        <div class="cLine"></div>
    </div>
    
    <!-- Main Content -->
    <div id="main_content">
    	<?php if($this->session->userdata('message')){ echo $this->session->userdata('message'); $this->session->set_userdata('message');}?>
		<?php $this->load->view($body);?>
    </div>
	    
    
    <!-- Footer line -->
    <div id="footer" style="z-index:-1;">
    	<div class="line"></div>
        <div class="wrapper">@Copy right. 2014</div>
    </div>

</div>
<div class="clear"></div>
</body>
</html>
<?php
	if($this->session->userdata('message')){
?>
	<!--<script>						
        //$(document).ready(function(){
            setTimeout(hideNotificationMessage,3000);
            function hideNotificationMessage()
                $("#notification_message").trigger("click");
        //});
    </script>-->
    
    
<?php }?>
<?php 
}else{
	redirect(base_url().'c_login', 'location', 302);
}
?>